import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:kepu/model/plant_type_entity.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

import '../../../util/http_util.dart';

part 'plant_type_list.g.dart';

@riverpod
Future<PlantTypeEntity> plantTypeList(Ref ref) async {
  var response = await DioInstance.instance().get(path: "type/list_plant");
  return PlantTypeEntity.fromJson(response.data);
}
